import Layout from '../views/layout/index.vue';

// 路由配置
// eslint-disable-next-line import/prefer-default-export
export const routesCfg = [
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    redirect: '/login',
    children: [
      {
        name: 'test1',
        path: '/test1',
        component: () => import('../views/test1/index.vue'),
        meta: {
          title: '测试',
          module: 'test1',
          menu: 'test1',
        },
      },
      {
        name: 'test2',
        path: '/test2',
        component: () => import('../views/test2/index.vue'),
        meta: {
          title: '测试',
          module: 'test2',
          menu: 'test2',
        },
      },
    ]
  },
  {
    name: 'login',
    path: '/login',
    component: () => import('@/views/login/login.vue'),
    meta: {
      title: '登录页',
    },
  },
  {
    path: '/:pathMatch(.*)*',
    component: () => import('../views/404.vue'),
    hidden: true,
  },
];
